﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="admin_tzgl_sctz.aspx.cs" Inherits="admin_tzgl_sctz" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>通知管理_删除通知</title>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
-->
</style>
<script>
var  highlightcolor='#d5f4fe';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var  clickcolor='#51b2f6';
function  changeto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=highlightcolor;
}
}

function  changeback(){
if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

function  clickto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}
</script>


</head>

<body>
<form runat="server">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="6%" height="19" valign="bottom"><div align="center"><img src="admin/images/tb.gif" width="14" height="14" /></div></td>
                <td width="94%" valign="bottom"><span class="STYLE1"> 通知列表</span></td>
              </tr>
            </table></td>
            <td><div align="right"><span class="STYLE1">
              <asp:Label ID="lbMsg" runat="server" ForeColor="Red"></asp:Label>
              </span><span class="STYLE1"> &nbsp;</span></div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>
    
    <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce" onmouseover="changeto()"  onmouseout="changeback()">
      <tr>        
        <td width="18%" height="20px" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">标题</span></div></td>
        <td width="40%" height="20px" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">内容</span></div></td>
        <td width="8%"  height="20px" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">重要性</span></div></td>
        <td width="12%" height="20px" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">创建时间</span></div></td>
        <td width="10%" height="20px" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">创建人</span></div></td>
        <td width="12%" height="20px" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">操作</span></div></td>        
        
      </tr>
      <asp:Repeater id="repeater1" runat="server">
            <ItemTemplate >      
              <tr>
                <td height="20px" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><%# DataBinder.Eval (Container .DataItem ,"name") %></div></td>
                <td height="20px" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><textarea rows="3" style="width:100%" readonly ><%# DataBinder.Eval (Container .DataItem ,"notice") %></textarea></div></td>
                <td height="20px" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><%#checkemergency((bool)DataBinder .Eval (Container .DataItem ,"emergency")) %></div></td>
                <td height="20px" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><%# DataBinder.Eval (Container .DataItem ,"created_at") %></div></td>
                <td height="20px" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><%#getAdminname((int)DataBinder.Eval(Container.DataItem, "created_by"))%></div></td>
                <td height="20px" bgcolor="#FFFFFF">
                    <div align="center" class="STYLE21">
                     <asp:LinkButton ID="btDelete" runat="server" OnClick="btDelete_Click" CommandName='<%# DataBinder.Eval(Container,"DataItem.id") %>' OnClientClick="return confirm( '您确认要删除吗？ ') ;">删除</asp:LinkButton>
                    </div>
                </td>
              </tr>
            </ItemTemplate>
      </asp:Repeater>      
    </table>    
    </td>
  </tr>
  <tr>
    <td style="height: 30px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="80%"><div align="left"><span class="STYLE22">&nbsp;&nbsp;&nbsp;&nbsp;共有<strong><%=dataTotal %></strong> 条记录，当前第<strong> <%=page %></strong> 页，共 <strong><%=pages %></strong> 页</span></div></td>
        <td width="20%"><table width="200" border="0" align="right" cellpadding="0" cellspacing="0">
          <tr>
            <td width="49"><div align="center"><a href="<%=page_url %>" ><img src="admin/images/main_54.gif" width="40" height="15" /></a></div></td>
            <td width="49"><div align="center"><a href="<%=page_url+"?page="+prePage.ToString() %>" ><img src="admin/images/main_56.gif" width="45" height="15" /></a></div></td>
            <td width="49"><div align="center"><a href="<%=page_url+"?page="+forPage.ToString() %>" ><img src="admin/images/main_58.gif" width="45" height="15" /></a></div></td>
            <td width="49"><div align="center"><a href="<%=page_url+"?page="+pages.ToString() %>" ><img src="admin/images/main_60.gif" width="40" height="15" /></a></div></td>
          </tr>
        </table></td>
      </tr>
      <tr>
      <td width="49" style="height: 19px"><div align="right"><asp:Button runat="server" id="button1" OnClick="btDelAll_Click" Text ="删除所有通知" Height ="18" BackColor="LightSkyBlue" BorderColor="LightSkyBlue"  OnClientClick ="return confirm('您确认要删除所有通知吗？');" ForeColor="Black"  /></div></td>
      </tr>
    </table></td>
  </tr>
</table>
</form> 
</body>
</html>

